Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Welcome to pgrx v0.11.0. It's a new "major" release with some new features, a faster "build.rs", and some bugfixes.
As always, please update by running
cargo install cargo-pgrx --version 0.11.0 --locked
and update your extension crateCargo.toml
files accordingly.What's Changed
Faster Buildings
@workingjubilee did some work to improve build times. As measured on their computer against
cargo check
, it's roughly a quarter faster. In doing so, the generated "bindings.rs" files look a little different and our "build.rs" has been cleaned up a bit.is_for_release
once by @workingjubilee in Check foris_for_release
once #1315Pure Rust implementation for
PgList
@workingjubilee did a tremendous amount of work creating a proper wrapper around Postgres' internal
List
type, calledPgList
.Some background here is that we intend to add the "dynamic function call" work (see below) to PL/Rust. In doing that work, use of Postgres'
List
type is pretty important and pgrx' existing implementation was a) mostly in the cshim, and b) just not very-good-and-sound. Considering (b) and also that PL/Rust isn't able to use anything from pgrx' chsim (a), @workingjubilee set out to make a proper Rust wrapper/implementation of Postgres'List
type.More Bindings
We've added more Postgres internals headers to the
pgrx-pg-sys
crate:Dynamic Function Calling
pgrx now allows calling any SQL-defined function (ie, via
CREATE FUNCTION
) in a (mostly) Rusty way with the new dynamic function calling support. Some documentation around this feature can be found in the sources, here and in the unit tests.As mentioned above, this feature will be exposed in PL/Rust soon. However, it's still an extremely powerful feature for pure pgrx extensions as it allows calling another function directly, with runtime type safety checks, without incurring any Spi overhead.
cargo pgrx install --sudo
Sometimes
cargo-pgrx install
can be tough to work with if targeting a package manager-managed Postgres installation as the various extension directories are owned by root.cargo pgrx install --sudo
fixes that by copying the files as root. The build, which is typically done as a regular user, is still run by that user -- only the file copying is run withsudo
.cargo pgrx install --sudo
by @eeeebbbbrrrr in Addcargo pgrx install --sudo
#1322Miscellaneous Work
Thanks!
Thanks to all the contributors! We appreciate the PRs and testing. And we especially like hearing about what you're building with pgrx.
Full Changelog: v0.10.2...v0.11.0